package com.hdu.hot100.binarySearch;

public class lc153 {
    class Solution {
        public int findMin(int[] nums) {
            int l = 0, r = nums.length - 1;
            while (l < r)
            {
                int mid = l + ((r - l) >> 1);
                if (nums[mid] < nums[r])
                {
                    r = mid;
                }
                else
                {
                    // nums[mid] > nums[r]
                    l = mid + 1;
                }
            }
            return nums[l];
        }
    }
}
